package com.sunnuwell.demo.vo;

import com.sunnuwell.demo.entity.ChildResource;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.util.List;

/**
 * @program: entry
 * @description: 菜单路由实体类
 * @author: Mr.lv
 * @create: 2019-04-28 09:28
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResourceVo {

    private String rid;
    private String path;
    private String component;
    private String redirect;
    private String name;
    private Object meta;
    private List<ChildResource> children;
    private Boolean hidden;

    public Boolean validate() {
        return path != null && redirect != null;
    }

    // 检查id
    public Boolean volidateRid() {
        return rid != null;
    }
}